{% extends "prof_base.html" %}

{% block title %}
Busca de aulas a serem dadas
{% endblock title %}

{% block extrahead %}
$(function() {
		$('#botao_busca').addClass('active');
                $( "#id_data_nascimento" ).datepicker({
			changeMonth: true,
			changeYear: true,
                        dateFormat: 'dd/mm/yy',
                        yearRange: '1900:2011'
		});
	});

{% endblock extrahead %}

{% block content %}
<div class="box-header clear">
	<h2>Busca de Aulas a Serem Dadas</h2>
</div>

<div class="box-wrap clear">
<!-- DATA-TABLE JS PLUGIN -->
<div id="data-table">
	<form method="post" action="">
		<table class="style1 datatable">
		<thead>
			<tr>
				<th>Data da aula:</th>
				<th>Aluno:</th>
				<th>Local:</th>
				<th>Detalhes:</th>
			</tr>
		</thead>
		<tbody>
			{% load status_aula %}
			{% for aula in aulas %}
				{% if aula.fim > hoje %}
				<tr>
					<td>{{aula.fim}}</td>
					<td>{% for aluno in aula.aluno.all %} {{aluno.nome}}; <br> {% endfor %} </td>
					<td>{{aula.local}}  - {{aula.id|ver_endereco}}</td>
					<td><a href="/prof_aluno/{{aula.id}}"><img src="/static/images/view_icon.gif" alt="" width="20" height="20" class="picture" align="center"/></a></td>
				</tr>
				{% endif %}
			{% endfor %}
			
			
		</tbody>
		</table>
		
		<div class="tab-footer clear fl">
		</div>
	</form>
</div><!-- /#table -->

</div><!-- end of box-wrap -->
{% endblock content %}